package com.szt;

/***
 * 测试
 * 
 * @author wwy
 *
 */
public class Demo2 {
	public static void main(String[] args) {
		for (int i = 1; i < 30; i++) {
			MyRunnable myRunnable = new MyRunnable(i + "");
			Thread t = new Thread(myRunnable, i + "");
			t.start();
			System.out.println("发送数据：" + i);
		}
	}
}

class MyRunnable implements Runnable {
	String prtNo = "";
	
	public MyRunnable(String str) {
		this.prtNo = str;
	}
	
	@Override
	public void run() {
		Demo sendAsync = Demo.getInstance();
		System.out.println(sendAsync);
		sendAsync.send(prtNo);
	}
}